from django.conf.urls import url
from . import views


urlpatterns = [
    #/goods/categories/
    url(r'^categories/$',views.CategoryView.as_view(),name='cagegories'),
    #http://api.meiduo.site:8000/goods/categories/115/hotskus/
    url(r'^categories/(?P<category_id>\d+)/hotskus/$',views.HotGoodsListView.as_view(),name='hot'),
    #http://api.meiduo.site:8000/goods/categories/115/skus/?page=1&page_size=5&ordering=-create_time
    url(r'^categories/(?P<category_id>\d+)/skus/$',views.GoodsListView.as_view(),name='goodsList'),
]

from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('search',views.GoodsSearchViewSet,base_name='search')
urlpatterns += router.urls
